<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">父级:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" id = "group" value = '{$ruledataList}'>
            {:build_select('row[pid]', $ruledata, $row['pid'], ['class'=>'form-control', 'required'=>'', 'disabled' => 'disabled'])}
            <input type="hidden" name="row[pid]" value = '{$row.pid}'>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div id="subField">
        {if condition="$row['haschild'] neq 1"}
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Contract')}:</label>
            <div class="col-xs-12 col-sm-8">
                <select name="row[contract]" id="county" class="form-control selectpicker">
                    <option value="">请选择合约期限</option>
                    {foreach name="contractList" id="contract" key="k"}
                    <option value="{$k}" {in name="k" value="$row.contract"}selected{/in}>{$contract}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Gratuity')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-gratuity" class="form-control" step="0.01" name="row[gratuity]" type="number" value="{$row.gratuity|htmlentities}">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Integral')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-integral" class="form-control" name="row[integral]" type="number" value="{$row.integral|htmlentities}">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Percentage')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-percentage" class="form-control" step="0.01" name="row[percentage]" type="number" value="{$row.percentage|htmlentities}">
            </div>
        </div>
        {/if}

    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
